Skip to content

docs: replace static diagrams with animations and set diagram math in LaTeX - #118

Merged
alexander-sei merged 5 commits into
mainfrom
docs/animated-diagrams-and-math
Dec 3, 2026
Merged

alexander-sei merged 5 commits into
mainfrom
docs/animated-diagrams-and-math

Conversation

@alexander-sei

Copy link
Copy Markdown
Collaborator

What is the purpose of the change?

This PR replaces the remaining static diagrams that walk through a process with steppable animations in the style of the Giga diagrams. It also sets math in LaTeX type. It removes five low-resolution PNGs and one text-art diagram. Until now, math in the Giga diagrams and specs was plain text or inline code, so the BUD root read U_n and the proof window read e^Lmax.

Describe the changes to the documentation

New animated diagrams. Each one uses the Giga player: Play, Pause, Back, Next, and step dots. It autoplays once a third of it scrolls into view, loops, and pauses off screen. Under prefers-reduced-motion, nothing starts on its own.

Page Diagram Replaces
learn/accounts AddressDerivation address-derivation.png
learn/pointers PointerContractsAccess, PointerContractsFlow The three pointer PNGs
learn/dev-interoperability EvmCosmWasmInterop interoperability.png
ai/agentic-wallets AgenticWalletFlow The text-art box diagram
evm/nonce-lanes SequentialNonceQueue, NonceLaneBundleLifecycle The static versions of the same exports
  • AddressDerivation follows one secp256k1 key pair through both derivations. The compressed key goes through SHA-256, RIPEMD-160, and bech32 to sei1…. The uncompressed key goes through Keccak-256 to 0x…. The two separate accounts then merge once association reveals the public key, through a first transaction or the addr precompile at 0x0000000000000000000000000000000000001004.
  • PointerContractsAccess replaces the before and after images with one animation. Neither wallet can cross the boundary until ERC and CW pointers stand in for the other side's tokens.
  • PointerContractsFlow follows an ERC-20 call through a pointer and the CosmWasm precompile (0x0000000000000000000000000000000000001002) or the Bank precompile (0x0000000000000000000000000000000000001001).
  • Pointer wording: both pointer diagrams say that pointer creation was retired in v6.8.0. They say "native coin" instead of TokenFactory, because the docs say that module is removed.
  • EvmCosmWasmInterop adds direct calls, pointer bridges, precompile calls, and CosmWasm's EVM dispatch one step at a time.
  • AgenticWalletFlow moves a transaction card through the agent, the SDK, the policy checks, the TEE signer, and the RPC. Its last step shows the policy engine blocking an over-limit request.
  • Nonce lanes: the queue stall and the bundle lifecycle now play out step by step. The comparison and benchmark diagrams on that page stay static.

LaTeX math

  • Diagram labels set math in Computer Modern: variables in italic, digits and operators upright, and real subscripts and superscripts. This covers U_n, D_n, d_n = LtHash(…), e^{L_max}, n + 1, h − 2, s + 1, f + 1, and 2^192 − 1.
  • Mintlify evaluates each export in isolation, so each diagram with math carries a small tex() helper. The giga-diagrams.jsx header documents it.
  • Step text and captions use a new sei-math class.
  • The fonts are KaTeX's MIT-licensed Computer Modern faces, self-hosted in assets/fonts (about 42 KB) as "Sei Math", so the diagrams don't depend on Mintlify's KaTeX CDN.
  • In giga/specs.mdx and giga/index.mdx, math that was set as inline code is now inline LaTeX. docs.json already enables it. Code-like identifiers such as Apply(...) and (key, newValue, n, prevHeight) stay as code.

Shared styles. style.css gains:

  • the Sei Math @font-face rules
  • --sei-font-math
  • the sei-math class
  • a data-sei-flow hook that marches dashes along a diagram's active path while it plays. The dashes stop on Pause and under reduced motion.

How it was checked

  • Console: in mint dev, with console errors recorded, I clicked through every step of each new diagram on the accounts, pointers, interoperability, and agentic-wallet pages. I scrolled through every diagram on the nonce-lane page and the three Giga pages. Nothing was logged.
  • Visuals: I checked key frames of each new diagram in light mode, and the accounts and agentic-wallet diagrams in dark mode.
  • LaTeX: on giga/specs, all 49 inline LaTeX expressions render with no KaTeX errors, so braces and < inside $…$ parse in MDX.
  • Local checks:
    • check-snippet-theme-default, check-redirects, check-skills, and jq empty docs.json pass.
    • The SEO audit output is identical to main.
    • typos is clean.
    • Vale reports nothing on changed lines.
    • mint broken-links finds no broken links.

Notes

  • llms-full.txt still links the five removed PNGs on mintcdn until the weekly regenerate-llms run. Trigger it through workflow_dispatch after merge to refresh it sooner.
  • Two Giga step titles now read "Order a block" and "Attest it later". The step dots use titles as plain-text labels, so the titles can't hold math.
  • The font binaries are MIT-licensed, and assets/fonts/LICENSE-KaTeX ships with them. The /fonts/ rule in .gitignore covers only the commercial brand fonts at the repo root.

Made with Cursor

alexander-sei and others added 4 commits December 3, 2026 12:54
Math in the Giga diagrams was plain text, so the BUD root read "U_n" and the proof window read "e^Lmax". Diagram labels now set math the way LaTeX does, in Computer Modern: variables in italic, digits and operators upright, and real subscripts and superscripts. This covers U_n, D_n, d_n = LtHash(...), e^{L_max}, block n + 1, h - 2, slot s + 1, and f + 1. Step text and captions use a new sei-math class for the same look. Two step titles that named block n now read "Order a block" and "Attest it later", because the step dots use titles as plain-text labels.

The fonts are KaTeX's MIT-licensed Computer Modern faces, self-hosted in assets/fonts as "Sei Math", so the diagrams do not depend on Mintlify's KaTeX CDN. In giga/specs.mdx and giga/index.mdx, math that was set as inline code (d_n = LH(X_n), eta = e^L_max, n = 3f + 1, a < b, and others) is now inline LaTeX, which docs.json already enables.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ted diagrams

The five static PNGs on the account, pointer contract, and EVM-CosmWasm pages are now steppable animations in the style of the Giga diagrams, with Play, Pause, Back, Next, step dots, scroll-triggered autoplay, and looping.

- Account linking: AddressDerivation follows one secp256k1 key pair through both derivations. The compressed key goes through SHA-256, RIPEMD-160, and bech32 to sei1..., and the uncompressed key goes through Keccak-256 to 0x.... The diagram then shows the two separate accounts merging into one when association reveals the public key through a first transaction or the addr precompile at 0x0000000000000000000000000000000000001004.
- Pointer contracts: PointerContractsAccess replaces the before and after images with one animation in which neither wallet can cross the boundary until ERC and CW pointers stand in for the other side's tokens. PointerContractsFlow walks an ERC-20 call through a pointer and the CosmWasm (0x...1002) or Bank (0x...1001) precompile to the CW-20 contract or the Bank Module. Both mention that pointer creation was retired in v6.8.0.
- EVM and CosmWasm: EvmCosmWasmInterop builds up direct calls, pointer bridges, precompile calls, and CosmWasm's EVM dispatch one step at a time.

The diagrams draw with currentColor and the Sei palette variables, so they follow the light and dark themes. A new data-sei-flow hook in style.css marches dashes along the active path while a diagram plays, and the dashes stop when it pauses or under prefers-reduced-motion.

Co-authored-by: Cursor <cursoragent@cursor.com>
The text-art box diagram under "How it works" is now AgenticWalletFlow, a steppable animation in the style of the Giga diagrams. A transaction card moves from the LLM agent through the wallet SDK, the policy engine checks (spending limit, allowlist, network), and the TEE signer to Sei's EVM RPC. A last step shows a request over the spending limit stopping at the policy engine, so nothing reaches the signer. The caption points readers to the comparison table for how each provider isolates keys on Sei.

Co-authored-by: Cursor <cursoragent@cursor.com>
SequentialNonceQueue now plays out the stall: nonce 5 lands, nonce 6 drops, nonces 7 and 8 strand behind the gap, Sei's producer mempool rejects them under Giga, and the hot-wallet workaround fans out. NonceLaneBundleLifecycle moves one bundle through take, simulate, sign at nonce n, journal, broadcast, and wait. The simulation-failure and same-nonce replacement branches light up at their steps, and the bundle settles before nonce n + 1 is used. The comparison and benchmark diagrams on the page stay static.

The NonceLanes lane-key range and the lifecycle's nonce labels now set 2^192 - 1, n, and n + 1 as LaTeX-style math.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mintlify

mintlify Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
sei-docs 🟢 Ready View Preview Dec 3, 2026, 2:38 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@cursor

cursor Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation and front-end presentation only; no runtime, auth, or on-chain behavior changes.

Reviewed by Cursor Bugbot for commit 0a342ce. Bugbot is set up for automated code reviews on this repo. Configure here.

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR replaces static diagrams with animated Giga-style players and switches Giga math to LaTeX. The MDX changes, CSS, and font licensing look sound, and none of the five deleted PNGs is still referenced outside the generated llms files. The one finding is a non-blocking wording issue: the association step doesn't say which address-precompile functions link accounts.

Findings: 0 blocking | 1 non-blocking | 1 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • None at the file/PR level.
  • 1 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread snippets/account-diagrams.jsx Resolved
The association step said that a call to the addr precompile links the two addresses, but most of its methods, such as getSeiAddr() and getEvmAddr(), only read an existing association. The step text and the label under the association line now name the two functions that create the link, associate() and associatePubKey(). The label wraps onto a second line to fit.

Co-authored-by: Cursor <cursoragent@cursor.com>
@alexander-sei
alexander-sei merged commit 60e14cf into main Dec 3, 2026
15 checks passed
@alexander-sei
alexander-sei deleted the docs/animated-diagrams-and-math branch December 3, 2026 14:51

This branch was successfully deployed

1 active deployment
staging — 0a342ce1 Deployed Dec 3, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant